<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>WordUtils (Apache Commons Lang 3.3.2 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="WordUtils (Apache Commons Lang 3.3.2 API)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/WordUtils.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/lang3/text/StrTokenizer.html" title="class in org.apache.commons.lang3.text"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/lang3/text/WordUtils.html" target="_top">Frames</a></li>
<li><a href="WordUtils.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.lang3.text</div>
<h2 title="Class WordUtils" class="title">Class WordUtils</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.commons.lang3.text.WordUtils</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">WordUtils</span>
extends <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block"><p>Operations on Strings that contain words.</p>
 
 <p>This class tries to handle <code>null</code> input gracefully.
 An exception will not be thrown for a <code>null</code> input.
 Each method documents its behaviour in more detail.</p></div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>2.0</dd>
<dt><span class="strong">Version:</span></dt>
  <dd>$Id: WordUtils.java 1583482 2014-03-31 22:54:57Z niallp $</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/commons/lang3/text/WordUtils.html#WordUtils()">WordUtils</a></strong>()</code>
<div class="block"><code>WordUtils</code> instances should NOT be constructed in
 standard programming.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/text/WordUtils.html#capitalize(java.lang.String)">capitalize</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str)</code>
<div class="block">Capitalizes all the whitespace separated words in a String.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/text/WordUtils.html#capitalize(java.lang.String, char...)">capitalize</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str,
          char...&nbsp;delimiters)</code>
<div class="block">Capitalizes all the delimiter separated words in a String.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/text/WordUtils.html#capitalizeFully(java.lang.String)">capitalizeFully</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str)</code>
<div class="block">Converts all the whitespace separated words in a String into capitalized words, 
 that is each word is made up of a titlecase character and then a series of 
 lowercase characters.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/text/WordUtils.html#capitalizeFully(java.lang.String, char...)">capitalizeFully</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str,
               char...&nbsp;delimiters)</code>
<div class="block">Converts all the delimiter separated words in a String into capitalized words, 
 that is each word is made up of a titlecase character and then a series of 
 lowercase characters.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/text/WordUtils.html#initials(java.lang.String)">initials</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str)</code>
<div class="block">Extracts the initial letters from each word in the String.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/text/WordUtils.html#initials(java.lang.String, char...)">initials</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str,
        char...&nbsp;delimiters)</code>
<div class="block">Extracts the initial letters from each word in the String.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/text/WordUtils.html#swapCase(java.lang.String)">swapCase</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str)</code>
<div class="block">Swaps the case of a String using a word based algorithm.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/text/WordUtils.html#uncapitalize(java.lang.String)">uncapitalize</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str)</code>
<div class="block">Uncapitalizes all the whitespace separated words in a String.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/text/WordUtils.html#uncapitalize(java.lang.String, char...)">uncapitalize</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str,
            char...&nbsp;delimiters)</code>
<div class="block">Uncapitalizes all the whitespace separated words in a String.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/text/WordUtils.html#wrap(java.lang.String, int)">wrap</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str,
    int&nbsp;wrapLength)</code>
<div class="block">Wraps a single line of text, identifying words by <code>' '</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/lang3/text/WordUtils.html#wrap(java.lang.String, int, java.lang.String, boolean)">wrap</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str,
    int&nbsp;wrapLength,
    <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;newLineStr,
    boolean&nbsp;wrapLongWords)</code>
<div class="block">Wraps a single line of text, identifying words by <code>' '</code>.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="WordUtils()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>WordUtils</h4>
<pre>public&nbsp;WordUtils()</pre>
<div class="block"><p><code>WordUtils</code> instances should NOT be constructed in
 standard programming. Instead, the class should be used as
 <code>WordUtils.wrap("foo bar", 20);</code>.</p>

 <p>This constructor is public to permit tools that require a JavaBean
 instance to operate.</p></div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="wrap(java.lang.String, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wrap</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;wrap(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str,
          int&nbsp;wrapLength)</pre>
<div class="block"><p>Wraps a single line of text, identifying words by <code>' '</code>.</p>
 
 <p>New lines will be separated by the system property line separator.
 Very long words, such as URLs will <i>not</i> be wrapped.</p>
 
 <p>Leading spaces on a new line are stripped.
 Trailing spaces are not stripped.</p>

 <table border="1" summary="Wrap Results">
  <tr>
   <th>input</th>
   <th>wrapLength</th>
   <th>result</th>
  </tr>
  <tr>
   <td>null</td>
   <td>*</td>
   <td>null</td>
  </tr>
  <tr>
   <td>""</td>
   <td>*</td>
   <td>""</td>
  </tr>
  <tr>
   <td>"Here is one line of text that is going to be wrapped after 20 columns."</td>
   <td>20</td>
   <td>"Here is one line of\ntext that is going\nto be wrapped after\n20 columns."</td>
  </tr>
  <tr>
   <td>"Click here to jump to the commons website - http://commons.apache.org"</td>
   <td>20</td>
   <td>"Click here to jump\nto the commons\nwebsite -\nhttp://commons.apache.org"</td>
  </tr>
  <tr>
   <td>"Click here, http://commons.apache.org, to jump to the commons website"</td>
   <td>20</td>
   <td>"Click here,\nhttp://commons.apache.org,\nto jump to the\ncommons website"</td>
  </tr>
 </table>

 (assuming that '\n' is the systems line separator)</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - the String to be word wrapped, may be null</dd><dd><code>wrapLength</code> - the column to wrap the words at, less than 1 is treated as 1</dd>
<dt><span class="strong">Returns:</span></dt><dd>a line with newlines inserted, <code>null</code> if null input</dd></dl>
</li>
</ul>
<a name="wrap(java.lang.String, int, java.lang.String, boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>wrap</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;wrap(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str,
          int&nbsp;wrapLength,
          <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;newLineStr,
          boolean&nbsp;wrapLongWords)</pre>
<div class="block"><p>Wraps a single line of text, identifying words by <code>' '</code>.</p>
 
 <p>Leading spaces on a new line are stripped.
 Trailing spaces are not stripped.</p>

 <table border="1" summary="Wrap Results">
  <tr>
   <th>input</th>
   <th>wrapLenght</th>
   <th>newLineString</th>
   <th>wrapLongWords</th>
   <th>result</th>
  </tr>
  <tr>
   <td>null</td>
   <td>*</td>
   <td>*</td>
   <td>true/false</td>
   <td>null</td>
  </tr>
  <tr>
   <td>""</td>
   <td>*</td>
   <td>*</td>
   <td>true/false</td>
   <td>""</td>
  </tr>
  <tr>
   <td>"Here is one line of text that is going to be wrapped after 20 columns."</td>
   <td>20</td>
   <td>"\n"</td>
   <td>true/false</td>
   <td>"Here is one line of\ntext that is going\nto be wrapped after\n20 columns."</td>
  </tr>
  <tr>
   <td>"Here is one line of text that is going to be wrapped after 20 columns."</td>
   <td>20</td>
   <td>"&lt;br /&gt;"</td>
   <td>true/false</td>
   <td>"Here is one line of&lt;br /&gt;text that is going&lt;br /&gt;to be wrapped after&lt;br /&gt;20 columns."</td>
  </tr>
  <tr>
   <td>"Here is one line of text that is going to be wrapped after 20 columns."</td>
   <td>20</td>
   <td>null</td>
   <td>true/false</td>
   <td>"Here is one line of" + systemNewLine + "text that is going" + systemNewLine + "to be wrapped after" + systemNewLine + "20 columns."</td>
  </tr>
  <tr>
   <td>"Click here to jump to the commons website - http://commons.apache.org"</td>
   <td>20</td>
   <td>"\n"</td>
   <td>false</td>
   <td>"Click here to jump\nto the commons\nwebsite -\nhttp://commons.apache.org"</td>
  </tr>
  <tr>
   <td>"Click here to jump to the commons website - http://commons.apache.org"</td>
   <td>20</td>
   <td>"\n"</td>
   <td>true</td>
   <td>"Click here to jump\nto the commons\nwebsite -\nhttp://commons.apach\ne.org"</td>
  </tr>
 </table></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - the String to be word wrapped, may be null</dd><dd><code>wrapLength</code> - the column to wrap the words at, less than 1 is treated as 1</dd><dd><code>newLineStr</code> - the string to insert for a new line, 
  <code>null</code> uses the system property line separator</dd><dd><code>wrapLongWords</code> - true if long words (such as URLs) should be wrapped</dd>
<dt><span class="strong">Returns:</span></dt><dd>a line with newlines inserted, <code>null</code> if null input</dd></dl>
</li>
</ul>
<a name="capitalize(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>capitalize</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;capitalize(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str)</pre>
<div class="block"><p>Capitalizes all the whitespace separated words in a String.
 Only the first letter of each word is changed. To convert the 
 rest of each word to lowercase at the same time, 
 use <a href="../../../../../org/apache/commons/lang3/text/WordUtils.html#capitalizeFully(java.lang.String)"><code>capitalizeFully(String)</code></a>.</p>

 <p>Whitespace is defined by <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html?is-external=true#isWhitespace(char)" title="class or interface in java.lang"><code>Character.isWhitespace(char)</code></a>.
 A <code>null</code> input String returns <code>null</code>.
 Capitalization uses the Unicode title case, normally equivalent to
 upper case.</p>

 <pre>
 WordUtils.capitalize(null)        = null
 WordUtils.capitalize("")          = ""
 WordUtils.capitalize("i am FINE") = "I Am FINE"
 </pre></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - the String to capitalize, may be null</dd>
<dt><span class="strong">Returns:</span></dt><dd>capitalized String, <code>null</code> if null String input</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/lang3/text/WordUtils.html#uncapitalize(java.lang.String)"><code>uncapitalize(String)</code></a>, 
<a href="../../../../../org/apache/commons/lang3/text/WordUtils.html#capitalizeFully(java.lang.String)"><code>capitalizeFully(String)</code></a></dd></dl>
</li>
</ul>
<a name="capitalize(java.lang.String, char...)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>capitalize</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;capitalize(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str,
                char...&nbsp;delimiters)</pre>
<div class="block"><p>Capitalizes all the delimiter separated words in a String.
 Only the first letter of each word is changed. To convert the 
 rest of each word to lowercase at the same time, 
 use <a href="../../../../../org/apache/commons/lang3/text/WordUtils.html#capitalizeFully(java.lang.String, char...)"><code>capitalizeFully(String, char[])</code></a>.</p>

 <p>The delimiters represent a set of characters understood to separate words.
 The first string character and the first non-delimiter character after a
 delimiter will be capitalized. </p>

 <p>A <code>null</code> input String returns <code>null</code>.
 Capitalization uses the Unicode title case, normally equivalent to
 upper case.</p>

 <pre>
 WordUtils.capitalize(null, *)            = null
 WordUtils.capitalize("", *)              = ""
 WordUtils.capitalize(*, new char[0])     = *
 WordUtils.capitalize("i am fine", null)  = "I Am Fine"
 WordUtils.capitalize("i aM.fine", {'.'}) = "I aM.Fine"
 </pre></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - the String to capitalize, may be null</dd><dd><code>delimiters</code> - set of characters to determine capitalization, null means whitespace</dd>
<dt><span class="strong">Returns:</span></dt><dd>capitalized String, <code>null</code> if null String input</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.1</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/lang3/text/WordUtils.html#uncapitalize(java.lang.String)"><code>uncapitalize(String)</code></a>, 
<a href="../../../../../org/apache/commons/lang3/text/WordUtils.html#capitalizeFully(java.lang.String)"><code>capitalizeFully(String)</code></a></dd></dl>
</li>
</ul>
<a name="capitalizeFully(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>capitalizeFully</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;capitalizeFully(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str)</pre>
<div class="block"><p>Converts all the whitespace separated words in a String into capitalized words, 
 that is each word is made up of a titlecase character and then a series of 
 lowercase characters.  </p>

 <p>Whitespace is defined by <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html?is-external=true#isWhitespace(char)" title="class or interface in java.lang"><code>Character.isWhitespace(char)</code></a>.
 A <code>null</code> input String returns <code>null</code>.
 Capitalization uses the Unicode title case, normally equivalent to
 upper case.</p>

 <pre>
 WordUtils.capitalizeFully(null)        = null
 WordUtils.capitalizeFully("")          = ""
 WordUtils.capitalizeFully("i am FINE") = "I Am Fine"
 </pre></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - the String to capitalize, may be null</dd>
<dt><span class="strong">Returns:</span></dt><dd>capitalized String, <code>null</code> if null String input</dd></dl>
</li>
</ul>
<a name="capitalizeFully(java.lang.String, char...)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>capitalizeFully</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;capitalizeFully(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str,
                     char...&nbsp;delimiters)</pre>
<div class="block"><p>Converts all the delimiter separated words in a String into capitalized words, 
 that is each word is made up of a titlecase character and then a series of 
 lowercase characters. </p>

 <p>The delimiters represent a set of characters understood to separate words.
 The first string character and the first non-delimiter character after a
 delimiter will be capitalized. </p>

 <p>A <code>null</code> input String returns <code>null</code>.
 Capitalization uses the Unicode title case, normally equivalent to
 upper case.</p>

 <pre>
 WordUtils.capitalizeFully(null, *)            = null
 WordUtils.capitalizeFully("", *)              = ""
 WordUtils.capitalizeFully(*, null)            = *
 WordUtils.capitalizeFully(*, new char[0])     = *
 WordUtils.capitalizeFully("i aM.fine", {'.'}) = "I am.Fine"
 </pre></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - the String to capitalize, may be null</dd><dd><code>delimiters</code> - set of characters to determine capitalization, null means whitespace</dd>
<dt><span class="strong">Returns:</span></dt><dd>capitalized String, <code>null</code> if null String input</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.1</dd></dl>
</li>
</ul>
<a name="uncapitalize(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>uncapitalize</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;uncapitalize(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str)</pre>
<div class="block"><p>Uncapitalizes all the whitespace separated words in a String.
 Only the first letter of each word is changed.</p>

 <p>Whitespace is defined by <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html?is-external=true#isWhitespace(char)" title="class or interface in java.lang"><code>Character.isWhitespace(char)</code></a>.
 A <code>null</code> input String returns <code>null</code>.</p>

 <pre>
 WordUtils.uncapitalize(null)        = null
 WordUtils.uncapitalize("")          = ""
 WordUtils.uncapitalize("I Am FINE") = "i am fINE"
 </pre></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - the String to uncapitalize, may be null</dd>
<dt><span class="strong">Returns:</span></dt><dd>uncapitalized String, <code>null</code> if null String input</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/lang3/text/WordUtils.html#capitalize(java.lang.String)"><code>capitalize(String)</code></a></dd></dl>
</li>
</ul>
<a name="uncapitalize(java.lang.String, char...)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>uncapitalize</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;uncapitalize(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str,
                  char...&nbsp;delimiters)</pre>
<div class="block"><p>Uncapitalizes all the whitespace separated words in a String.
 Only the first letter of each word is changed.</p>

 <p>The delimiters represent a set of characters understood to separate words.
 The first string character and the first non-delimiter character after a
 delimiter will be uncapitalized. </p>

 <p>Whitespace is defined by <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html?is-external=true#isWhitespace(char)" title="class or interface in java.lang"><code>Character.isWhitespace(char)</code></a>.
 A <code>null</code> input String returns <code>null</code>.</p>

 <pre>
 WordUtils.uncapitalize(null, *)            = null
 WordUtils.uncapitalize("", *)              = ""
 WordUtils.uncapitalize(*, null)            = *
 WordUtils.uncapitalize(*, new char[0])     = *
 WordUtils.uncapitalize("I AM.FINE", {'.'}) = "i AM.fINE"
 </pre></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - the String to uncapitalize, may be null</dd><dd><code>delimiters</code> - set of characters to determine uncapitalization, null means whitespace</dd>
<dt><span class="strong">Returns:</span></dt><dd>uncapitalized String, <code>null</code> if null String input</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.1</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/lang3/text/WordUtils.html#capitalize(java.lang.String)"><code>capitalize(String)</code></a></dd></dl>
</li>
</ul>
<a name="swapCase(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>swapCase</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;swapCase(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str)</pre>
<div class="block"><p>Swaps the case of a String using a word based algorithm.</p>
 
 <ul>
  <li>Upper case character converts to Lower case</li>
  <li>Title case character converts to Lower case</li>
  <li>Lower case character after Whitespace or at start converts to Title case</li>
  <li>Other Lower case character converts to Upper case</li>
 </ul>
 
 <p>Whitespace is defined by <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html?is-external=true#isWhitespace(char)" title="class or interface in java.lang"><code>Character.isWhitespace(char)</code></a>.
 A <code>null</code> input String returns <code>null</code>.</p>
 
 <pre>
 StringUtils.swapCase(null)                 = null
 StringUtils.swapCase("")                   = ""
 StringUtils.swapCase("The dog has a BONE") = "tHE DOG HAS A bone"
 </pre></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - the String to swap case, may be null</dd>
<dt><span class="strong">Returns:</span></dt><dd>the changed String, <code>null</code> if null String input</dd></dl>
</li>
</ul>
<a name="initials(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>initials</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;initials(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str)</pre>
<div class="block"><p>Extracts the initial letters from each word in the String.</p>
 
 <p>The first letter of the string and all first letters after
 whitespace are returned as a new string.
 Their case is not changed.</p>

 <p>Whitespace is defined by <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html?is-external=true#isWhitespace(char)" title="class or interface in java.lang"><code>Character.isWhitespace(char)</code></a>.
 A <code>null</code> input String returns <code>null</code>.</p>

 <pre>
 WordUtils.initials(null)             = null
 WordUtils.initials("")               = ""
 WordUtils.initials("Ben John Lee")   = "BJL"
 WordUtils.initials("Ben J.Lee")      = "BJ"
 </pre></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - the String to get initials from, may be null</dd>
<dt><span class="strong">Returns:</span></dt><dd>String of initial letters, <code>null</code> if null String input</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.2</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/lang3/text/WordUtils.html#initials(java.lang.String, char...)"><code>initials(String,char[])</code></a></dd></dl>
</li>
</ul>
<a name="initials(java.lang.String, char...)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>initials</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;initials(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;str,
              char...&nbsp;delimiters)</pre>
<div class="block"><p>Extracts the initial letters from each word in the String.</p>
 
 <p>The first letter of the string and all first letters after the
 defined delimiters are returned as a new string.
 Their case is not changed.</p>

 <p>If the delimiters array is null, then Whitespace is used.
 Whitespace is defined by <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html?is-external=true#isWhitespace(char)" title="class or interface in java.lang"><code>Character.isWhitespace(char)</code></a>.
 A <code>null</code> input String returns <code>null</code>.
 An empty delimiter array returns an empty String.</p>

 <pre>
 WordUtils.initials(null, *)                = null
 WordUtils.initials("", *)                  = ""
 WordUtils.initials("Ben John Lee", null)   = "BJL"
 WordUtils.initials("Ben J.Lee", null)      = "BJ"
 WordUtils.initials("Ben J.Lee", [' ','.']) = "BJL"
 WordUtils.initials(*, new char[0])         = ""
 </pre></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>str</code> - the String to get initials from, may be null</dd><dd><code>delimiters</code> - set of characters to determine words, null means whitespace</dd>
<dt><span class="strong">Returns:</span></dt><dd>String of initial letters, <code>null</code> if null String input</dd><dt><span class="strong">Since:</span></dt>
  <dd>2.2</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../org/apache/commons/lang3/text/WordUtils.html#initials(java.lang.String)"><code>initials(String)</code></a></dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/WordUtils.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/lang3/text/StrTokenizer.html" title="class in org.apache.commons.lang3.text"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/lang3/text/WordUtils.html" target="_top">Frames</a></li>
<li><a href="WordUtils.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2001&#x2013;2014 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>
